let api = {};
api.install = function (Vue) {
    if (api.installed) {
        return;
    }
    api.installed = true;
    let root = '';

    let data = {
        login: {method: "post", url: root + "/server/anonymous/login"},
        register: {method: "post", url: root + '/server/anonymous/register'},
        listOrg: {method: "get", url: root + '/server/user/listOrg'},
        friends: {method: "get", url: root + '/server/user/friends'},
        addFriend: {method: "post", url: root + '/server/user/addFriend'},
        historyMsg: {method: "post", url: root + '/server/user/historyMsg'},
    };

    Vue.prototype.$api = data
}
export default api
